1. Field of the Invention
This invention relates to communication systems, and more particulary, to a method and apparatus to detect tones in a noisy signal environment using noise detection and dynamic thresholding.
2. Description of the Related Art
Communication systems often utilize a loop to connect terminal equipment such as telephone instruments, facsimile machines, private branch exchanges, key telephone systems, voice mail systems, modems, computers, alarm systems, radio controlled systems and telephone answering machines as well as many other devices. These devices are often referred to as Customer Premises Equipment (xe2x80x9cCPExe2x80x9d). To perform various signaling applications such as telephone dialing, data entry, caller ID, and storage system control, Dual-Tone Multiple Frequency (xe2x80x9cDTMFxe2x80x9d) signals are often used. A DTMF signal is defined by two superimposed sinusoidal waveforms with frequencies generally chosen within the voice band.
Detection of multiple-tone, multiple frequency (MTMF) signals, such as Dual-Tone Multiple Frequency (DTMF) signals in environments where one or more noise signals is present is generally recognized by those of ordinary skill in the art to be a complex issue. Detection of MTMF signals is particularly difficult when the noise signals share the voiceband used for inband MTMF signaling. One source of noise interference which impedes MTMF detection is referred to as xe2x80x9ctalk-offxe2x80x9d. Talk-off occurs whenever a signal tone detector erroneously accepts signal imitations, such as those produced by speech or music, as valid signals. These noise signals can imitate some of the temporal and spectral characteristics of signaling tones. These imitations are likely to trigger, or talk-off, signal tone detectors. An important goal in designing such detectors is making them immune to these signal imitations.
An additional problem with signal tone recognition is that signaling tones must, in some situations, compete with speech, music or other extraneous background noise. The existence of these complex noise signals introduces spectral components into the signal to be recognised that distort and ultimately impair the detection of valid signaling tones. A signal detector is said to have been xe2x80x9ctalked downxe2x80x9d whenever it fails to recognize valid signaling tones that were masked by noise signals such as speech, music or other noise.
One embodiment of the present invention pertains to an apparatus for detecting at least one tone having a known frequency and duration in an input signal. The input signal is input over a period of time which is divided into frame portions including at least an initial frame portion and a last frame portion. An energy signal indicative of the energy of the input signal during each frame portion is generated. A signal filter receives the energy signal and generates a noise indicator for each frame portion based on whether noise is detected in the energy signal. A dynamic threshold determiner generates an energy threshold for each frame portion. The energy threshold for the initial frame portion is generated based on a minimum expected value of the energy signal for a subsequent frame portion. The energy thresholds for frame portions subsequent to the initial frame portion are generated based on values of the energy signals during previous frame portions and the noise indicator. A signal processor determines when the input signal includes the at least one tone based on the energy threshold, the noise indicator, and the energy signal.
In the present invention, the input signal may be an analog signal that is converted to the frequency domain. The energy signal of the input signal is generated using a discrete Fourier transform, such as the Goertzel algorithm. The signal filter separates a portion of the energy signal associated with the at least one tone from a remaining portion of the energy signal, and sets the noise indicator based on the remaining portion of the input energy signal being above a noise threshold. A variety of signal filters may be utilized in the present invention, however a preferred embodiment of the signal filter includes a low pass filter for separating the portion of the energy signal associated with the at least one tone from the remaining portion of the energy signal, a signal averaging filter for determining an average value of the remaining portion of the energy signal, and a peak detector for determining the maximum average value.
The signal processor compares the energy levels for the at least one tone between at least two frame portions to determine whether the at least one tone is detected. The signal processor may allow at least one dropout in energy level in a corresponding frame portion to improve the present invention""s tone detection. A dropout occurs when the energy for the entire frame portion is below a threshold, or when a linearly increasing energy count for a portion of a frame portion falls below a count threshold. The signal processor also determines when the energy levels of the at least one tone are within a predetermined range between at least two frames. Further, the signal processor may normalize the energy levels between the at least two frames based on the number of samples in each of the at least two frames before comparing the energy levels.
A further embodiment of the present invention is a method for detecting at least one tone having a known frequency and duration in an input signal, wherein the input signal may include a plurality of tones and noise. The method includes determining at least an initial frame portion and a last frame portion based at least partially on the frequency and duration of the at least one tone, determining an initial energy threshold detection level for the initial frame portion, and determining an energy value indicative of the energy of the input signal for the initial frame portion. The initial energy threshold detection level is based on a minimum expected energy level. The method further includes determining energy threshold detection levels for frame portions subsequent to the initial frame portion based on the energy value of previous frame portions and whether noise is detected in the input signal. The energy values between subsequent frame portions and selected previous frame portions are compared to determine if the at least one tone is present in the input signal. The method proceeds for subsequent frame portions until the energy value for the last frame portion is compared to the energy value for a previous frame portion.